﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewReport.aspx.cs" Inherits="MDH_ReportTTLL" %>

<%@ Register Src="../Interface/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../Interface/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<%@ Register TagPrefix="hmwebmenu" TagName="MyMenu" Src="~/Interface/menu.ascx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Tim kiem bao cao</title>
    <LINK href="../VNPTStyle.css" type="text/css" rel="stylesheet">
    <script language="javascript" src="../JS/calender.js">
    </script>
    <link href="../VNPTStyle.css" rel="stylesheet" type="text/css" />
    <link href="../VNPTStyle.css" rel="stylesheet" type="text/css" />
    <link href="../VNPTStyle.css" rel="stylesheet" type="text/css" />
    <link href="../VNPTStyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table height="450" width="900" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="2" style="width: 2199px;">
                    <uc1:header ID="Header1" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="2" height="10" valign="top" style="width: 2199px">
                    <hmwebmenu:MyMenu ID="MenuTop" runat="server" MenuToLoad="TopMenu" />
                </td>
            </tr>
            <tr>
                <td colspan="2" height="80%" valign="top" style="height: 420px;">
                    <table cellpadding="0" cellspacing="0" width="500">
                        <tr>
                            <td style="height: 0px">
                                <asp:Label ID="Label8" runat="server" Font-Bold="True"
                                    Text="Báo cáo => Tổng hợp báo cáo theo chức năng"></asp:Label></td>
                        </tr>
                        <tr>
                            <td>
                                <table width="550">
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" Text="Từ ngày:"></asp:Label></td>
                                        <td valign="middle">
                                            <asp:TextBox ID="tbFromDate" runat="server" CssClass="TextBoxDate" MaxLength="10"></asp:TextBox><input type="image" src="../Image/calender.gif" width="20" height="20" onclick="fPopCalendar(tbFromDate,tbFromDate); return false" style="width: 17px; height: 17px" /></td>
                                        <td valign="middle" width="40">
                                            <asp:Label ID="Label1" runat="server" Text="Đến ngày:" Width="70px"></asp:Label></td>
                                        <td>
                                            <asp:TextBox ID="tbToDate" runat="server" CssClass="TextBoxDate" MaxLength="10"></asp:TextBox><input type="image" src="../Image/calender.gif" width="20" height="20" onclick="fPopCalendar(tbToDate,tbToDate); return false" style="width: 17px; height: 17px" /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label4" runat="server" Text="Tìm theo đơn vị:"></asp:Label></td>
                                        <td>
                                            <asp:DropDownList ID="ddlLocal" runat="server">
                                            </asp:DropDownList></td>
                                        <td align="center" colspan="2">
                                            <asp:Button ID="Button1" runat="server" Text="Tìm kiếm" CssClass="Button" OnClick="Button1_Click" /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label9" runat="server" Text="Chọn loại báo cáo:"></asp:Label></td>
                                        <td colspan="3">
                                            <asp:DropDownList ID="ddlLoaiBC" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlLoaiBC_SelectedIndexChanged">
                                            <asp:ListItem Value="1">Ph&#225;t triển dịch vụ</asp:ListItem>
                                            <asp:ListItem Value="2">Ti&#234;u thụ xăng dầu</asp:ListItem>
                                            <asp:ListItem Value="3">T&#236;nh trạng trong ng&#224;y</asp:ListItem>
                                            <asp:ListItem Value="4">Th&#244;ng tin li&#234;n lạc</asp:ListItem>
                                        </asp:DropDownList></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="40">
                                <asp:MultiView ID="mvBC" runat="server">
                                    <asp:View ID="vPTDV" runat="server">
                                <asp:Label ID="Label3" runat="server" Font-Bold="True" CssClass="HeaderTitles">Báo cáo phát triển dịch vụ</asp:Label><asp:GridView ID="gvPTDV" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                    CellPadding="3" OnPageIndexChanging="gvPTDV_PageIndexChanging" Width="800px">
                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                    <Columns>
                                        <asp:BoundField DataField="LocalName" HeaderText="T&#234;n Đơn Vị" SortExpression="LocalName">
                                            <HeaderStyle Wrap="True" Width="100px" />
                                            <ItemStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Ng&#224;y gửi" HeaderStyle-Width="80px" HeaderStyle-HorizontalAlign="Center">
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:dd/MM/yyyy}",Eval("CrtdDate"))%>
                                                    </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="ServiceName" HeaderText="Loại dịch vụ">
                                            <HeaderStyle Width="80px" />
                                        </asp:BoundField>
                                        
                                        <asp:TemplateField HeaderText="Tổng số">
                                            <HeaderStyle Width="50px" HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# String.Format("{0:#,#}",Eval("Total"))%>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Right" />
                                        </asp:TemplateField>
                                        
                                        <asp:TemplateField HeaderText="Ph&#225;t triển mới">
                                            <HeaderStyle Width="50px" HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# String.Format("{0:#,#}", Eval("New"))%>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Right" />
                                        </asp:TemplateField>
                                        
                                        <asp:TemplateField HeaderText="Tạm dừng">
                                            <HeaderStyle Width="50px" HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# String.Format("{0:#,#}", Eval("Pause"))%>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Right" />
                                        </asp:TemplateField>
                                        
                                        <asp:TemplateField HeaderText="Hủy bỏ">
                                            <HeaderStyle Width="50px" HorizontalAlign="Center" />
                                            <ItemTemplate>
                                                <%# String.Format("{0:#,#}", Eval("Destroy"))%>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Right" />
                                        </asp:TemplateField>
                                        
                                        <asp:BoundField DataField="Phone" HeaderText="ĐT li&#234;n lạc" SortExpression="Phone" >
                                            <HeaderStyle Width="100px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="UserName" HeaderText="Người gửi" SortExpression="UserName" >
                                            <HeaderStyle Width="100px" />
                                        </asp:BoundField>
                                    </Columns>
                                    <RowStyle ForeColor="#000066" />
                                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                </asp:GridView>
                                    </asp:View>
                                    <asp:View ID="vTTXD" runat="server">
                                <asp:Label ID="Label7" runat="server" Font-Bold="True" CssClass="HeaderTitles">Báo cáo tiêu thụ xăng dầu</asp:Label><br />
                                        <asp:GridView ID="gvTTXD" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                            CellPadding="3" OnPageIndexChanging="gvTTXD_PageIndexChanging" Width="900px">
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <Columns>
                                                <asp:BoundField DataField="LocalName" HeaderText="T&#234;n đơn vị" />
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Ng&#224;y gửi
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:dd/MM/yyyy}",Eval("CrtdDate"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="StationName" HeaderText="Trạm b&#225;o c&#225;o" SortExpression="StationName" />
                                                <asp:BoundField DataField="GeneratorName" HeaderText="Loại m&#225;y nổ" SortExpression="GeneratorName" />
                                                <asp:BoundField DataField="Norms" HeaderText="Định mức" SortExpression="Norms" />
                                                <asp:BoundField DataField="FromTime" HeaderText="Từ giờ" />
                                                <asp:BoundField DataField="ToTime" HeaderText="Tới giờ" />
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Giờ chạy m&#225;y nổ
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}",Eval("TimeMayNo"))%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Ti&#234;u thụ xăng(l&#237;t)
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}", Eval("Gas"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Ti&#234;u thụ dầu(l&#237;t)
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}", Eval("Oil"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="Phone" HeaderText="ĐT li&#234;n lạc" SortExpression="Phone" />
                                                <asp:BoundField DataField="UserName" HeaderText="Người b&#225;o c&#225;o" />
                                            </Columns>
                                            <RowStyle ForeColor="#000066" />
                                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                        </asp:GridView>
                                    </asp:View>
                                    <asp:View ID="vTHTN" runat="server">
                                <asp:Label ID="Label6" runat="server" Font-Bold="True" CssClass="HeaderTitles">Báo cáo tình hình trong ngày</asp:Label><asp:GridView ID="gvSTT" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                    CellPadding="3" OnPageIndexChanging="gvSTT_PhanTrang">
                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                    <Columns>
                                        <asp:BoundField DataField="LocalName" HeaderText="T&#234;n đơn vị" SortExpression="LocalName" />
                                        <asp:BoundField DataField="CrtdDay" HeaderText="Ng&#224;y gửi" SortExpression="CrtdDay" DataFormatString="{0:d}" />
                                        <asp:BoundField DataField="Status" HeaderText="T&#236;nh h&#236;nh trong ng&#224;y"
                                            SortExpression="Status" />
                                        <asp:BoundField DataField="Roaming" HeaderText="T&#236;nh h&#236;nh Roaming" SortExpression="Roaming" />
                                        <asp:BoundField DataField="Phone" HeaderText="ĐT li&#234;n lạc" SortExpression="Phone" />
                                        <asp:BoundField DataField="UserName" HeaderText="Người gửi" SortExpression="UserName" />
                                    </Columns>
                                    <RowStyle ForeColor="#000066" />
                                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                </asp:GridView>
                                    </asp:View>
                                    <asp:View ID="vTTLL" runat="server">
                                        <asp:Label ID="Label10" runat="server" Font-Bold="True" CssClass="HeaderTitles">Báo cáo thông tin liên lạc</asp:Label><br />
                                        <asp:GridView ID="gvTHLL" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                            CellPadding="3" Width="380px" OnPageIndexChanging="gvTHLL_PageIndexChanging">
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <Columns>
                                                <asp:BoundField DataField="LocalName" HeaderText="T&#234;n đơn vị" SortExpression="LocalName">
                                                    <HeaderStyle Width="50px" />
                                                </asp:BoundField>
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Ng&#224;y gửi
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:dd/MM/yyyy}",Eval("CrtdDate"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="ServiceName" HeaderText="T&#234;n dịch vụ" SortExpression="ServiceName">
                                                    <HeaderStyle Width="50px" />
                                                </asp:BoundField>
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Do m&#225;y
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}", Eval("LostDoMay"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Do d&#226;y
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}", Eval("LostDoDay"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                <asp:TemplateField>
                                                    <HeaderTemplate>
                                                        Kh&#225;c
                                                    </HeaderTemplate>
                                                    <HeaderStyle Width="50px" />
                                                    <ItemTemplate>
                                                        <%# String.Format("{0:#.##}", Eval("Khac"))%>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </asp:TemplateField>
                                                
                                                <asp:BoundField DataField="UserName" HeaderText="Người gửi" SortExpression="UserName">
                                                    <HeaderStyle Width="50px" />
                                                </asp:BoundField>
                                            </Columns>
                                            <RowStyle ForeColor="#000066" />
                                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                        </asp:GridView>
                                    </asp:View>
                                </asp:MultiView>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width: 2199px">
                    <uc2:footer ID="Footer1" runat="server" />
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
